﻿IF OBJECT_ID('up_MapHtml_GpsVisitDistributionPole') IS not NULL
DROP PROC up_MapHtml_GpsVisitDistributionPole

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_MapHtml_GpsVisitDistributionPole')
	DROP PROCEDURE up_MapHtml_GpsVisitDistributionPole
GO


create proc up_MapHtml_GpsVisitDistributionPole (@id int) as

/*
	by: ariel hualpa
	on: April 09
	to: select google earth balloon html for a distribution pole
*/

-- return either the record value in the table or the function result if record value is null

select dbo.fn_MapHTML_GpsVisitDistributionPole(@Id)

GO

exec up_MapHtml_GpsVisitDistributionPole 3085  